home *** CD-ROM | disk | FTP | other *** search
- ; BUG! BUG! BUG! Theres a prob with the Memory identifier code! I'll fixit
- ; soon! But u may peek and play 4 the mo.
-
- ; This Proggo just checks the current machines status/spec. Proccesor (680x0)
- ; Mem Types (Chip, Slow, Fast). Active and Accessible Disk drives, and
- ; wether the machine is AGA or not, everything works except Memory type.
-
- Opt c-
- Section "Find Configuration",Code_c
-
- IncDir Df1:
-
- Start Movem.l d0-d7/a0-a6,-(sp)
- Bsr KillSys+$20 ; Kill SYS AgaSeg
-
- Lea ProcStat(pc),a5 ; Get Processor Status
- Move.w d0,00(a5) ; Processor Type
- Move.w d1,02(a5) ; Bit 0 = AGA if 1
- Move.l a0,04(a5) ; a0 = GFX Base
- Move.l a1,08(a5) ; a1 = Vector Base Register
-
- Lea DiagScreen(pc),a0
- Lea DiagPiccy(pc),a1; Text Screen
- Move.l a1,(a0) ; Set Screen
-
- Bsr SetDiagBPLS ; Set BPLS
-
- Lea DiagCopper(pc),a0
- Lea HardWare,a6
- Move.l a0,Cop1Lc(a6)
- Move.w #$83c0,DMACon(a6)
-
- Moveq #0,d0 ; Setup Code
- Bsr TrackDisk+$20 ; Find Active Drives
- Lea ActiveDrives(pc),a5
- Or.w #1,d0 ; Set Drive 0
- Move.w d0,(a5) ; (oops)
-
- Bsr ShowStats ; Show Other Status INFO
-
- Loop Btst #6,$Bfe001
- Bne Loop
-
- Bsr KillSys+$22
- Movem.l (sp)+,d0-d7/a0-a6
- Moveq #0,d0
- Rts
-
- SetDiagBPLS Lea DiagBPLS(pc),a0
- Move.l DiagScreen(pc),a1
- Move.l a1,d0
- Move.w d0,6(a0)
- Swap d0
- Move.w d0,2(a0)
- Rts
-
- CheckRam Moveq #0,d5 ; Zoikes! Bugs!
- Move.l #"Psy!",$80000 ; Dont take notes from this
- Cmp.l #"Psy!",$00000 ; shambles!
- Beq CheckSlowRam ; Ooh, Shagratt would have
- Bset #0,d5 ; a heart attack if he
- CheckSlowRam Move.w $C00002,d0 ; saw this!
- Move.w $Dff002,d1
- Cmp.w d0,d1
- Beq CheckFast
- Bset #1,d5
- CheckFast Move.l #"Psx!",$200000
- Cmp.l #"Psx!",$200000
- Bne NoFastRam
- Bset #2,d5
- NoFastRam Lea MemStat(pc),a5
- Move.w d5,(a5)
- Move.w d5,$110
- Rts
-
- ShowStats Lea TextXPos(pc),a5 ; Write Status Info
- Move.l #$00020078,(a5)
-
- Lea ProcessorText(pc),a6
- Bsr WriteText
-
- Move.w ProcStat(pc),d0
- Cmpi.w #0,d0
- Beq Get000Text
- Cmpi.w #1,d0
- Beq Get010Text
- Cmpi.w #2,d0
- Beq Get020Text
- Cmpi.w #3,d0
- Beq Get030Text
- Cmpi.w #4,d0
- Beq Get040Text
-
- Lea UnknownText(pc),a6
- Bra PutProcText
-
- Get000Text Lea Proc000Text(pc),a6
- Bra PutProcText
- Get010Text Lea Proc010Text(pc),a6
- Bra PutProcText
- Get020Text Lea Proc020Text(pc),a6
- Bra PutProcText
- Get030Text Lea Proc030Text(pc),a6
- Bra PutProcText
- Get040Text Lea Proc040Text(pc),a6
-
- PutProcText Bsr WriteText ; Show Processor Type
-
- Lea TextXPos(pc),a5
- Move.w #2,00(a5)
- Add.w #40*12,02(a5)
-
- Bsr CheckRam
- Lea MemText(pc),a6
- Bsr WriteText
- Move.w MemStat(pc),d0
- Btst #0,d0
- Beq TrySlow
- Lea ChipRamText(pc),a6
- Bsr WriteText
- TrySlow Move.w MemStat(pc),d0
- Btst #1,d0
- Beq TryFast
- Lea SlowRamText(pc),a6
- Bsr WriteText
- TryFast Move.w MemStat(pc),d0
- Btst #2,d0
- Beq NoMem
-
- Lea FastRamText(pc),a6
- Bsr WriteText ; Show Ram Types
-
- NoMem Lea TextXPos(pc),a5
- Move.w #2,00(a5)
- Add.w #40*12,02(a5)
-
- Lea DrivesText(pc),a6
- Bsr WriteText
- Moveq #0,d7
- Moveq #48,d6
- ShowDrive Move.w ActiveDrives(pc),d2
- Btst d7,d2 ; Show Available Disk
- Beq NoDrive ; Drives.
-
- Moveq #0,d0
- Move.b #"D",d0
- Bsr TextPlace
- Moveq #0,d0
- Move.b #"f",d0
- Bsr TextPlace
- Move.l d6,d0
- Bsr TextPlace
- Moveq #0,d0
- Move.b #":",d0
- Bsr TextPlace
- Moveq #0,d0
- Move.b #" ",d0
- Bsr TextPlace
-
- NoDrive Addq #1,d6
- Addq #1,d7
- Cmp.b #4,d7
- Bne ShowDrive
-
- Lea TextXPos(pc),a5
- Move.w #2,00(a5)
- Add.w #40*12,02(a5)
-
- Move.w AGAStat(pc),d0
- Tst.w d0
- Beq NoAGA
- Lea AGAText(pc),a6
- Bra WriteChipText
- NoAGA Lea ECSText(pc),a6
- WriteChipText Bsr WriteText ; Show if AGA or NOT!
-
- Rts
-
- WriteText Moveq #0,d0 ; Text Writer
- Move.b (a6)+,d0
- Cmp.b #0,d0
- Beq EndText
- Bsr TextPlace
- Bra WriteText
- EndText Rts
-
- ShowVar Move.l #0,d6 ; Show a Decimal Number in
- Move.l d0,d6 ; text
-
- Move.l #10000,d1
- Bsr DoDiagDivs
- DoThousands Move.l #1000,d1
- Bsr DoDiagDivs
- DoHundreds Move.l #100,d1
- Bsr DoDiagDivs
- DoTens Move.l #10,d1
- Bsr DoDiagDivs
- DoUnits Move.l #1,d1
- Bsr DoDiagDivs
-
- Rts
-
- DoDiagDivs Divs d1,d6
- Move.w d6,d0
- And.w #$f,d0
- Add.w #48,d0
- Bsr TextPlace
- Move.w #0,d6
- Swap d6
- Rts
-
- TextModulo = (40*1)
-
- TextPlace Move.l DiagScreen(pc),a0; Write Text from font onto
- Lea Font(pc),a1 ; Screen..
- Sub.w #32,d0
- Add.w d0,d0
- Add.w d0,d0
- Add.w d0,d0
- Moveq #0,d1
- Move.w d0,d1
- Add.l d1,a1
-
- Moveq #0,d0
- Moveq #0,d1
- Move.w TextXPos(pc),d0
- Move.w TextYPos(pc),d1
-
- Add.l d0,a0
- Add.l d1,a0
-
- Move.b 00(a1),00(a0)
- Move.b 01(a1),TextModulo(a0)
- Move.b 02(a1),TextModulo*2(a0)
- Move.b 03(a1),TextModulo*3(a0)
- Move.b 04(a1),TextModulo*4(a0)
- Move.b 05(a1),TextModulo*5(a0)
- Move.b 06(a1),TextModulo*6(a0)
- Move.b 07(a1),TextModulo*7(a0)
- Lea TextXPos(pc),a4
- Add.w #1,00(a4)
- Cmp.w #40,00(a4)
- Bne NotEndLine
- Move.w #0,00(a4)
- Add.w #1,02(a4)
- NotEndLine Rts
-
- ProcessorText Dc.b "Processor Type:- ",0
- Even
-
- Proc000Text Dc.b "68000 ",0
- Proc010Text Dc.b "68010 ",0
- Proc020Text Dc.b "68020 ",0
- Proc030Text Dc.b "68030 ",0
- Proc040Text Dc.b "68040 ",0
-
- UnknownText Dc.b "Unknown",0
- Even
-
- ECSText Dc.b "Standard Chipset Found",0
- Even
-
- AGAText Dc.b "AGA Chipset Found",0
- Even
-
- MemText Dc.b "Memory Types :- ",0
- Even
-
- ChipRamText Dc.b "Meg Chip ",0
- SlowRamText Dc.b "Slow ",0
- FastRamText Dc.b "Fast ",0
- Even
-
- DrivesText Dc.b "Active Drives :- ",0
- Even
-
- DiagScreen Dc.l 0
- TextXPos Dc.w 0
- TextYPos Dc.w 0
- TextPtr Dc.l 0
-
- ActiveDrives Dc.w 0
-
- MemStat Dc.w 0
- ProcStat Dc.w 0
- AGAStat Dc.w 0
- GFXBase Dc.l 0
- VBRBase Dc.l 0
-
- Cmv Macro
- Dc.w \2,\1
- EndM
-
- Cwt Macro
- Dc.w (\1*$100)+$01,$fffe
- EndM
-
- Pal Macro
- Dc.w $ffe1,$fffe
- EndM
-
- EndCop Macro
- Dc.w $ffff,$fffe
- EndM
-
- DiagCopper Cwt $15
- Cmv $0200,BplCon0
- Cmv $00bb,BplCon1
- Cmv $000a,BplCon2
- Cmv $0034,DdfStrt
- Cmv $00c8,DdfStop
- Cmv $1681,DiwStrt
- Cmv $36c1,DiwStop
- Cmv $0,BplMod1
- Cmv $0,BplMod2
- Cwt $25
- Cmv $0000,Color00
- Cmv $0fff,Color01
- DiagBPLS Cmv $c,BplPt0h
- Cmv $0,BplPt0l
- Cwt $37
- Cmv $f00,Color00
- Cwt $38
- Cmv $200,Color00
- Cmv $1200,BplCon0
-
- Cwt $88
- Cmv $f00,Color00
- Cmv $0200,BplCon0
- Cwt $89
- Cmv $000,Color00
- EndCop
-
- DiagPiccy Ds.l 80*10
-
- Font Incbin Bitmaps/Font.Raw
- KillSys Incbin CodeSegments/KillSysAGA-Seg
- TrackDisk Incbin CodeSegments/NuTrakkerFINAL-Seg
-
- ****Custom Chip Registers****
-
- Hardware = $Dff000
-
- ;Control Registers
-
- Dmaconr = $002
- Vposr = $004
- Vhposr = $006
- Joy0dat = $00A
- Joy1dat = $00C
- Clxdat = $00E
- Intenar = $01C
- Intereqr = $01E
- Copcon = $02E
-
- ;Blitter Registers
-
- Bltcon0 = $040
- Bltcon1 = $042
- Bltafwm = $044
- Bltalwm = $046
- Bltcpth = $048
- Bltcptl = $04A
- Bltbpth = $04C
- Bltbptl = $04E
- Bltapth = $050
- Bltaptl = $052
- Bltdpth = $054
- Bltdptl = $056
- Bltsize = $058
- Bltcmod = $060
- Bltbmod = $062
- Bltamod = $064
- Bltdmod = $066
- Bltcdat = $070
- Bltbdat = $072
- Bltadat = $074
-
- ;Copper Registers
-
- Cop1lc = $080
- Cop1lch = $080
- Cop1lcl = $082
- Cop2lc = $084
- Cop2lch = $084
- Cop2lcl = $086
- Copjmp1 = $088
- Copjmp2 = $08A
- Diwstrt = $08E
- Diwstop = $090
- Ddfstrt = $092
- Ddfstop = $094
- Dmacon = $096
- Clxcon = $098
- Intena = $09A
- Intreq = $09C
-
- ;BitPlane Registers
-
- BplCon0 = $100
- BplCon1 = $102
- BplCon2 = $104
- BplMod1 = $108
- BplMod2 = $10a
-
- BplPt0h = $0e0
- BplPt0l = $0e2
- BplPt1h = $0e4
- BplPt1l = $0e6
- BplPt2h = $0e8
- BplPt2l = $0ea
- BplPt3h = $0ec
- BplPt3l = $0ee
- BplPt4h = $0f0
- BplPt4l = $0f2
- BplPt5h = $0f4
- BplPt5l = $0f6
-
- ;Colour Registers
-
- Color00 = $180
- Color01 = $182
- Color02 = $184
- Color03 = $186
- Color04 = $188
- Color05 = $18a
- Color06 = $18c
- Color07 = $18e
- Color08 = $190
- Color09 = $192
- Color10 = $194
- Color11 = $196
- Color12 = $198
- Color13 = $19a
- Color14 = $19c
- Color15 = $19e
- Color16 = $1a0
- Color17 = $1a2
- Color18 = $1a4
- Color19 = $1a6
- Color20 = $1a8
- Color21 = $1aa
- Color22 = $1ac
- Color23 = $1ae
- Color24 = $1b0
- Color25 = $1b2
- Color26 = $1b4
- Color27 = $1b6
- Color28 = $1b8
- Color29 = $1ba
- Color30 = $1bc
- Color31 = $1be
-
- EcsNop = $1fe
-
-
-
-
-
-
-
-
-
-